<?php

class PermissionTable extends Doctrine_Table
{

    public static function getInstance()
    {
        return Doctrine_Core::getTable('Permission');
    }

    public static function getByUserId($userId)
    {
        $query = self::getInstance()->createQuery();
        $query->where('user_id = ?', $userId);

        return $query->fetchArray();
    }

}
